#pragma once
#include "core_interface.h"
#include <memory>

using lib_wrapper::ILogger;

class DefaultLogger final : public ILogger {
public:
    explicit DefaultLogger(const std::string& filename = "./logs/log.txt");
    ~DefaultLogger() override;

    DefaultLogger(const DefaultLogger&) = delete;
    DefaultLogger& operator=(const DefaultLogger&) = delete;
    DefaultLogger(DefaultLogger&&) = default;
    DefaultLogger& operator=(DefaultLogger&&) = default;

    void log(const std::string& level, const std::string& message) override;
    void set_level(const std::string& level) override;
    void flush() override;

private:
    class Impl;
    std::unique_ptr<Impl> pimpl_;
};
